package com.zxy.ziems.server.energy.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.sql.Time;

@Data
public class EnergyPriceTimeDTO {
    @NotBlank(message = "分段名称不可为空", groups = {EnergyPriceTimeDTO.Update.class, EnergyPriceTimeDTO.Delete.class})
    private String id; // ID

    @NotBlank(message = "分段名称不可为空", groups = {EnergyPriceTimeDTO.Add.class})
    private String name; // 名称

    @NotNull(message = "分段开始时间不可为空", groups = {EnergyPriceTimeDTO.Add.class})
    private Time startTime; // 开始时间

    @NotNull(message = "分段结束时间不可为空", groups = {EnergyPriceTimeDTO.Add.class})
    private Time endTime; // 结束时间

    public interface Add { }

    public interface Update { }

    public interface Delete { }
}
